import React, {Component} from "react";
import {
	TabNavigator,
	StackNavigator,
} from "react-navigation";
import {
	View,
	Text,
	Image,
	Button,
} from "react-native";
import styles from "./style";

import SQLite from "../db/sqlite";

export default class ShoppingIndex extends Component {
	static navigationOptions = ({navigation}) => {
		return {
			tabBarLabel: "商城",
			title: "商城首页",
			tabBarIcon: ({tintColor}) => ( 
				< Image source = {require("../images/shopping.png")}
					style = {[{tintColor: tintColor}, styles.tabIcon]}
				/>
			),
		}
		
	}

	constructor(props) {
		super(props);
	}
	componentDidMount() {
		const {navigate} = this.props.navigation;
		navigate("Shopping");
	}
	render() {
		return ( 
			<View style={{flex: 1}}>
				<Text>商城首页</Text>
				<SQLite />
			</View>
		);
	}
}


